
function $ajax({url,success}){
    var xhr = new XMLHttpRequest();
    xhr.open("GET",url,true);
    xhr.send();
    xhr.onreadystatechange = function(){
        if(xhr.readyState === 4){
            if(xhr.status >= 200 && xhr.status < 300){
                var res = JSON.parse(xhr.responseText);
                success(res);
            }
        }
    }
}
